﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Forum : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["g"] != null && Request.QueryString["g"] != "")
        {
            switch (Request.QueryString["g"].ToString())
            {
                case "cp_changepassword":
                case "rules":
                case "login":
                    //Response.Redirect("~/Forum.aspx");
                    break;
                default: break;
            }
        }
        if (Request.Cookies["texchange"] != null && Request.Cookies["texchange"]["logged"] != null && DAO.GlobalSettings.Decrypt(Request.Cookies["texchange"]["logged"]) == "true")
        {
            YAF.Forum forum = new YAF.Forum();
            phMain.Controls.Add(forum);
        }
        else
        {
            UserControl uc = (UserControl)this.LoadControl("main/uc_access.ascx");
            phMain.Controls.Add(uc);
        }
    }
}
